<?php
define('KAIZOKU',1);
/**
 * mt-erp default constnat
 * 
 * @package WordPress
 * @subpackage mt-erp
 * @copyright nuarharuha <nhnoah+mt-erp@gmail.com>
 * ================================================================
 * SVN revision information:
 * @version $Revision: 4 $:
 * @author  $Author: nhnoah@gmail.com $:
 * @date    $Date: 2012-04-17 06:42:39 +0000 (Tue, 17 Apr 2012) $:
 * ================================================================
 * @since 0.1
 */

// wordpress root dir
if ( !defined('WP_ROOT') ) {
    define( 'WP_ROOT', (strtr(realpath(ABSPATH), array("\\", DIRSEP))) );
}

// template root dir
define('MT_DIR',TEMPLATEPATH.DIRSEP);

define('MT_LIB',MT_DIR.'lib'.DIRSEP);

//class
define('MT_LIB_CLASS',MT_LIB.'class'.DIRSEP);

// modules dir
define('MT_LIB_MOD',MT_LIB.'modules'.DIRSEP);

// import class dir
define('MT_LIB_IMPORT',MT_LIB.'import'.DIRSEP);

/**
 * Import WP shortcode dir
 * @since 1.6.2
 */
define('MT_LIB_IMPORT_SHORTCODE',MT_LIB_IMPORT.'shortcode'.DIRSEP);

/**
 * Import template dir
 * @since 1.6.2
 */
define('MT_LIB_IMPORT_TEMPLATE',MT_LIB_IMPORT.'template'.DIRSEP);

// public dir
define('MT_PUB',MT_DIR.'public'.DIRSEP);

//public cache dir
define('MT_CACHE_DIR',MT_PUB.'cache');

// public images dir
define('MT_IMG_DIR',MT_DIR.'images'.DIRSEP);

// public images import dir
define('MT_IMG_IMPORT_DIR',MT_IMG_DIR.'import'.DIRSEP);

// public stylesheet dir
define('MT_CSS_DIR',MT_PUB.'css'.DIRSEP);

// public stylesheet cached dir
define('MT_CACHE_CSS_DIR',MT_CACHE_DIR.DIRSEP.'css'.DIRSEP);

// public scripts dir
define('MT_JS_DIR',MT_PUB.'scripts'.DIRSEP);

// public javascript cached dir
define('MT_CACHE_JS_DIR',MT_CACHE_DIR.DIRSEP.'scripts'.DIRSEP);

/**
 * Fonts dir
 * @since 1.2
 */
define('MT_FONTS_DIR',(strtr(realpath(MT_PUB.'webfonts'), array("\\", DIRSEP))).DIRSEP);

/**
 * GD fonts Image cache dir
 * @since 1.2
 */
define('MT_CACHE_FONTS_DIR',(strtr(realpath(MT_CACHE_DIR.DIRSEP.'webfonts'), array("\\", DIRSEP))));

define('MT_CACHE_AVATAR_DIR',MT_CACHE_DIR.DIRSEP.'avatar');

/**
 * Wordpress blog URL
 * @since   1.6 
 */
define('MT_URL', get_option('siteurl') );

define('MT_URL_SLASHIT', trailingslashit( MT_URL ) );

/**
 * Blog home URL
 * @since 1.6.2
 */
define('MT_HOME_URL', get_option('home') );

/**
 * Blog home URL with trailing slash (not user trailing slash)
 * @since 1.6.2
 */
define('MT_HOME_URL_SLASHIT', trailingslashit(get_option('home')) );

/**
 * WordPress Admin URL
 * @since 1.6.2
 */
define('MT_ADMIN_URL', site_url('wp-admin/','admin') );

/**
 * Wordpress Blog Name
 * @since	1.6
 */
define( 'MT_BLOG_NAME', get_bloginfo('name')  );

define( 'MT-WPT', 'mt_erp' );

define( 'MT_META', 'wp-erp' );

define( 'MT_THEME_URL', trailingslashit( get_bloginfo('template_url') ) );

define('THEME_IMG_URL', MT_THEME_URL . 'images/' );
/**
 * MT_ERP database prefix  
 * @since	1.6
 */
define( 'MT_META_PREFIX', 'mods_' . MT_META . '_' );

define( 'MT_KEY', md5(SECRET_KEY) );	

/**
 * Client Support XML
 * @since 1.6.2
 */

define('MT_CLIENT_ACCEPT_XML',(stristr($_SERVER['HTTP_ACCEPT'],'application/xml') ) );

/**
 * Client Support XHTML parser (q= 0.x)
 * @since 1.6.2
 */
define('MT_CLIENT_ACCEPT_XHTML_XML',(stristr($_SERVER['HTTP_ACCEPT'],'application/xhtml+xml') ) );

define('PHP_T',"\t");

if (!defined('WP_VERSION'))  define('WP_VERSION', get_bloginfo('version'));

if (!defined('WP_VERSION_MAJ')) define('WP_VERSION_MAJ', (float) WP_VERSION);


//define('FIREBUG_CONSOLE',1);

// non expensive current timestamp -time();
define('SV_CURRENT_TIMESTAMP',$_SERVER['REQUEST_TIME']);

/**
 * Client User agent string
 * @since 1.6.2
 */
define('SV_UA_STRING',$_SERVER['HTTP_USER_AGENT']); 

define('MT_ONE_LINER',1);

define('MT_IS_IMAGE_READY', (file_exists(MT_IMG_DIR.'MT.png')) );

/**
 * check template htacess file
 * WP 2.8+ strip all .htacess file extracted from archive
 */
define('MT_IS_HTACCESS', (file_exists(MT_DIR.'.htaccess'))  );